﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    x:Class="KBS.FamilyLines.Controls.NewUserControl"
    xmlns:local="clr-namespace:KBS.FamilyLines"
    xmlns:properties="clr-namespace:KBS.FamilyLines.Properties"
    >

  <UserControl.Resources>
    <local:ImageConverter x:Key="ImageConverter"/>
  </UserControl.Resources>
  
  <StackPanel MinWidth="302" Width="Auto">

    <!-- Header -->
    <Border Background="{DynamicResource BackgroundBrush}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1,1,1,0" CornerRadius="5,5,0,0" Height="30">
      <TextBlock Text="{x:Static properties:Resources.NewHeader}" TextWrapping="Wrap" Margin="15,5,10,5" Foreground="{DynamicResource HeaderFontColor}" FontSize="18" VerticalAlignment="Center" FontWeight="Bold"></TextBlock>
    </Border>

    <!-- Content -->
    <Border BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1,1,1,1">
      <Grid Margin="0,0,0,0" Background="{DynamicResource InputBackgroundBrush}" Height="194">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="153*"/>
          <ColumnDefinition Width="153*"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
          <RowDefinition Height="Auto" MinHeight="50" />
          <RowDefinition Height="Auto" MinHeight="93" />
          <RowDefinition Height="Auto" MinHeight="25" />
        </Grid.RowDefinitions>

        <StackPanel Orientation="Horizontal" Grid.ColumnSpan="2" Height="63" VerticalAlignment="Top">
          <StackPanel Grid.Row="0" Margin="10,0,0,0" Height="58" Width="69">
            <Label Content="{x:Static properties:Resources.Gender}" Target="{Binding ElementName=MaleRadioButton, Mode=OneWay}" Foreground="{DynamicResource InputFontColor}"/>
            <RadioButton  x:Name="MaleRadioButton" IsChecked="True" TabIndex="90" Margin="5,0,0,0" Foreground="Black">
                <Label Padding="0" Content="{x:Static properties:Resources.Male}" Foreground="{DynamicResource InputFontColor}"/>
            </RadioButton>
            <RadioButton TabIndex="95" Margin="5,0,0,0" Foreground="Black">
                <Label Padding="0" Content="{x:Static properties:Resources.Female}" Foreground="{DynamicResource InputFontColor}"/>
            </RadioButton>
          </StackPanel>
        </StackPanel>

        <StackPanel Grid.Row="1" Margin="10,0,0,0" Height="93.22" VerticalAlignment="Top">
          <Label Content="{x:Static properties:Resources.Names}" Target="{Binding ElementName=NamesInputTextBox, Mode=OneWay}" Foreground="{DynamicResource InputFontColor}"/>
          <TextBox TextWrapping="Wrap" x:Name="NamesInputTextBox" HorizontalAlignment="Left" Height="22" Width="130" Margin="5,0,0,0" TabIndex="100"/>
          <Label Content="{x:Static properties:Resources.DateOfBirth}" Target="{Binding ElementName=BirthDateInputTextBox, Mode=OneWay}" Foreground="{DynamicResource InputFontColor}"/>
          <TextBox TextWrapping="Wrap" x:Name="BirthDateInputTextBox" HorizontalAlignment="Left" Height="22" Width="130" Margin="5,0,0,0" TabIndex="120"/>
        </StackPanel>

        <StackPanel Grid.Row="1" Grid.Column="1" Height="93.22" Margin="0,0,-1,0" VerticalAlignment="Top">
          <Label Content="{x:Static properties:Resources.Surname}" Target="{Binding ElementName=SurnameInputTextBox, Mode=OneWay}" Foreground="{DynamicResource InputFontColor}" />
          <TextBox TextWrapping="Wrap" x:Name="SurnameInputTextBox" Width="130" Height="22" HorizontalAlignment="Left" Margin="5,0,0,0" TabIndex="110"/>
          <Label Content="{x:Static properties:Resources.BirthPlace}" Target="{Binding ElementName=BirthPlaceInputTextBox, Mode=OneWay}" Foreground="{DynamicResource InputFontColor}" />
          <TextBox TextWrapping="Wrap" x:Name="BirthPlaceInputTextBox" Width="130" Height="22" HorizontalAlignment="Left" Margin="5,0,0,0" TabIndex="130"/>
        </StackPanel>

        <StackPanel Grid.Row="2" Grid.ColumnSpan="2" Margin="15,12.5,10,15" Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Stretch">
          <Button Content="{x:Static properties:Resources.Add}" x:Name="AddButton" VerticalAlignment="Bottom" Height="15" IsDefault="True" HorizontalAlignment="Left" Click="AddButton_Click" TabIndex="140" Style="{DynamicResource RedButtonStyle}"/>
        </StackPanel>
      </Grid>
    </Border>

    <!-- Footer -->
    <Border Background="{DynamicResource BackgroundBrush}" Height="15" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1,0,1,1" CornerRadius="0,0,5,5"/>

  </StackPanel>
</UserControl>
